#ifndef __BODY_RAYCAST_RESULT_HPP__
#define __BODY_RAYCAST_RESULT_HPP__

#include "Engine/Vector3.hpp"
#include "Engine/Ray3.h"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    struct ComponentBody;
    struct BodyRaycastResult
    {
        Ray3 ray;
        ComponentBody *componentBody = nullptr;
        float distance;

        inline Vector3 hitPoint();
    };

    inline Vector3 BodyRaycastResult::hitPoint()
    {
        return ray.Position + ray.Direction * distance;
    }
    
} // namespace PocketSurvival

#endif
